﻿<phone:PhoneApplicationPage x:Class="Animation.MoveBallPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            Orientation="Portrait"
                            SupportedOrientations="Portrait"
                            shell:SystemTray.IsVisible="True"
                            mc:Ignorable="d">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="myStoryboard2" AutoReverse="False" RepeatBehavior="10x">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="ball2">
				<EasingDoubleKeyFrame KeyTime="0" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="380">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="380">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="2">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ball2">
				<EasingColorKeyFrame KeyTime="0:0:1" Value="#FFF300FF"/>
				<EasingColorKeyFrame KeyTime="0:0:2" Value="#FFFFBA02"/>
				<EasingColorKeyFrame KeyTime="0:0:3" Value="Red"/>
				<EasingColorKeyFrame KeyTime="0:0:3.9" Value="#FF8B00FF"/>
				<EasingColorKeyFrame KeyTime="0:0:4" Value="Red"/>
			</ColorAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Top)" Storyboard.TargetName="ball2">
				<EasingDoubleKeyFrame KeyTime="0" Value="200">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="197">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="595">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="595">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="197">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar>
            <shell:ApplicationBarIconButton x:Name="barPlay"
                                            Click="barPlay_Click"
                                            IconUri="/Assets/AppBar/transport.play.png"
                                            Text="Play" />
            <shell:ApplicationBarIconButton x:Name="barPasuse"
                                            Click="barPasuse_Click"
                                            IconUri="/Assets/AppBar/transport.pause.png"
                                            Text="Pause" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
    <Canvas x:Name="myCanvas" Loaded="myCanvas_Loaded" >
    	<Ellipse x:Name="ball2" Fill="#FF2EFF00" Height="100" Canvas.Left="47" Stroke="Black" Canvas.Top="197" Width="100"/>
    </Canvas>
</phone:PhoneApplicationPage>